-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test update, ruff checks, deprecations warnings and import checks. #190
base: develop
Are you sure you want to change the base?
Conversation
|
||
|
||
loader = importlib.util.find_spec("triangle") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The imports are all checked in this file and in the test of the software the consts are imported from here.
@@ -517,7 +500,7 @@ def validate(self): | |||
# print("Downloading the Extension JSON schema file(s):") | |||
if "extensions" in self.j: | |||
for ext in self.j["extensions"]: | |||
theurl = self.j["extensions"][ext]["url"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disabled this line because it was not used.
@@ -1054,7 +1038,10 @@ def get_info(self, long=False): | |||
if geom["semantics"] is not None: | |||
for srf in geom["semantics"]["surfaces"]: | |||
sem_srf.add(srf["type"]) | |||
getsorted = lambda a: sorted(list(a)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was required by ruff
@@ -1430,27 +1415,7 @@ def merge(self, lsCMs): | |||
raise KeyError( | |||
f"The member 'values' is missing from the texture '{m}' in CityObject {theid}" | |||
) | |||
# -- metadata | |||
if self.has_metadata_extended() or cm.has_metadata_extended(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code had to be removed as there are no metadata_extended anymore
@@ -2047,17 +2011,6 @@ def filter_lod(self, thelod): | |||
self.remove_duplicate_vertices() | |||
self.remove_orphan_vertices() | |||
self.update_bbox() | |||
# -- metadata | |||
if self.has_metadata_extended(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above, this too had to be removed.
nodes.append({ | ||
"matrix": [1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 1], | ||
"children": [], | ||
"name": cm.j.get("metadata", "citymodel").get("identifier", "citymodel") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was failing if there were no 'metadata' so I changed it. @hugoledoux can you verify that it is ok?
print(i, v) | ||
vtx_idx_np[i] = i | ||
bin_vtx = vtx_np.astype(np.float32).tostring() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deprecation warning.
@@ -11,7 +11,7 @@ license_file = LICENSE | |||
|
|||
[tool:pytest] | |||
log_cli = true | |||
collect_ignore = ['setup.py'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deprecation warning
In this PR:
TESTS:
IMPORTS:
RUFF CHECKS & FORMAT:
I will leave some extra comments below in some things that need attention